<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>测试时间</title>
  <script src="./moment.min.js"></script>
  <script src="./jquery-3.6.min.js"></script>
</head>
<body>
  <div id="time"></div>
</body>
<script>
  $(document).ready(function(){
    let time = moment().add(1, 's').format("YYYY-MM-DD HH:mm:ss");
    // let time = moment("2023-02-07 09:44:59","YYYY-MM-DD HH:mm:ss").add(1, 's').valueOf();
    // time =moment(time).format("YYYY-MM-DD HH:mm:ss")
    console.log("time:",time)
    $("#time").html(time)
  })
</script>
</html>